package jk.zmn.thread.pro;

/**
 * @author 张梦楠
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2018/5/2619:33
 * @blog www.itzmn.com
 */
public class Consumer implements Runnable {

    private Good good;

    public Consumer(Good good) {
        this.good = good;
    }

    @Override
    public void run() {
        while (good.nums>0) {
            good.eat();
        }
    }
}
